﻿
namespace NetROS.Tiers.Windows.Forms
{
	/// <summary>
	/// abstract TecajValute typed datagridview
	/// </summary>
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	public abstract class TecajValuteDataGridViewBase : System.Windows.Forms.UserControl
	{	
		/// <summary> 
		/// Thrown when the current Entity changed.
		/// </summary>
		public event System.EventHandler<TecajValuteDataGridViewEventArgs> CurrentEntityChanged;
		
		#region Fields
				
		/// <summary> 
		/// the current entity.
		/// </summary>
		private Entities.TecajValute _currentTecajValute = null;
		//private Dictionary<string, string> _columnsHeaders = new Dictionary<string, string>();
		
		/// <summary> 
		/// the datagridview instance
		/// </summary>
		protected System.Windows.Forms.DataGridView uxTecajValuteDataGridView;
		
		/// <summary> 
		/// the errorprovider
		/// </summary>
		protected System.Windows.Forms.ErrorProvider uxTecajValuteErrorProvider;
		
		/// <summary> 
		/// the bindingsource
		/// </summary>
		protected System.Windows.Forms.BindingSource uxTecajValuteBindingSource;
		
		
		/// <summary> 
		/// the DGV column associated with the ID property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxIDDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IDValuta property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIDValutaDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the Srednji property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxSrednjiDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the Kupovni property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxKupovniDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the Prodajni property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxProdajniDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the DatumObjave property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxDatumObjaveDataGridViewColumn;
		/// <summary> 
		/// the DGV column associated with the IDBanka property
		/// </summary>
		protected System.Windows.Forms.DataGridViewComboBoxColumn uxIDBankaDataGridViewColumn;
		
		/// <summary> 
		/// the DGV column associated with the DatumPrimjene property
		/// </summary>
		protected System.Windows.Forms.DataGridViewTextBoxColumn uxDatumPrimjeneDataGridViewColumn;
		
		#endregion
					
		#region Combo list
		
				
		private Entities.TList<Entities.Banka> _IDBankaList;
		
		/// <summary> 
		/// The list of selectable Banka
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.Banka> IDBankaList
		{
			get {return this._IDBankaList;}
			set 
			{
				this._IDBankaList = value;
				this.uxIDBankaDataGridViewColumn.DataSource = null;
				this.uxIDBankaDataGridViewColumn.DataSource = this._IDBankaList;
			}
		}
		
		private bool _allowNewItemInIDBankaList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of Banka
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIDBankaList
		{
			get { return _allowNewItemInIDBankaList;}
			set
			{
				this._allowNewItemInIDBankaList = value;
				this.uxIDBankaDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
				
		private Entities.TList<Entities.Valuta> _IDValutaList;
		
		/// <summary> 
		/// The list of selectable Valuta
		/// </summary>
		[System.ComponentModel.Category("DropDownList BindingSources")]
		public Entities.TList<Entities.Valuta> IDValutaList
		{
			get {return this._IDValutaList;}
			set 
			{
				this._IDValutaList = value;
				this.uxIDValutaDataGridViewColumn.DataSource = null;
				this.uxIDValutaDataGridViewColumn.DataSource = this._IDValutaList;
			}
		}
		
		private bool _allowNewItemInIDValutaList;
		
		/// <summary> 
		/// Indicates if user can add an item in the list of Valuta
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIDValutaList
		{
			get { return _allowNewItemInIDValutaList;}
			set
			{
				this._allowNewItemInIDValutaList = value;
				this.uxIDValutaDataGridViewColumn.DisplayStyle = value ? System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox : System.Windows.Forms.DataGridViewComboBoxDisplayStyle.DropDownButton;
			}
		}
		
		#endregion
		
		#region Main Datasource
		
		private Entities.TList<Entities.TecajValute> _TecajValuteList;
				
		/// <summary> 
		/// The list of TecajValute to be displayed in the DGV.
		/// </summary>
		[System.ComponentModel.Category("Data")]
		public Entities.TList<Entities.TecajValute> TecajValuteList
		{
			get {return this._TecajValuteList;}
			set
			{
				this._TecajValuteList = value;
				this.uxTecajValuteBindingSource.DataSource = null;
				this.uxTecajValuteBindingSource.DataSource = value;
				this.uxTecajValuteDataGridView.DataSource = null;
				this.uxTecajValuteDataGridView.DataSource = this.uxTecajValuteBindingSource;				
				//this.uxTecajValuteBindingSource.ListChanged += new System.ComponentModel.ListChangedEventHandler(uxTecajValuteBindingSource_ListChanged);
				this.uxTecajValuteBindingSource.CurrentItemChanged += new System.EventHandler(OnTecajValuteBindingSourceCurrentItemChanged);
			}
		}
		
		private void OnTecajValuteBindingSourceCurrentItemChanged(object sender, System.EventArgs e)
		{
			_currentTecajValute = uxTecajValuteBindingSource.Current as Entities.TecajValute;
			
			if (_currentTecajValute != null)
			{
				_currentTecajValute.Validate();
			}
			//_TecajValute.Validate();
			OnCurrentEntityChanged();
		}

		//void uxTecajValuteBindingSource_ListChanged(object sender, System.ComponentModel.ListChangedEventArgs e)
		//{
			//throw new Exception("The method or operation is not implemented.");
		//}		
		
		#endregion
		
		/// <summary>
		/// Gets the currently selected <c cref="Entities.TecajValute"/> instance.
		/// </summary>
		public Entities.TecajValute SelectedTecajValute
		{
			get {return this._currentTecajValute;}
		}
		
		#region other properties
		
		/// <summary>
		/// Gets or sets a value indicating whether you have provided your own data-management operations for the DataGridView control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool VirtualMode
		{
			get {return this.uxTecajValuteDataGridView.VirtualMode;}
			set
			{
				this.uxTecajValuteDataGridView.VirtualMode = value;
			}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the option to add rows is displayed to the user.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToAddRows
		{
			get {return this.uxTecajValuteDataGridView.AllowUserToAddRows;}
			set {this.uxTecajValuteDataGridView.AllowUserToAddRows = value;}
		}
		
		/// <summary>
		/// Gets or sets a value indicating whether the user is allowed to delete rows from the DataGridView.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public bool AllowUserToDeleteRows
		{
			get {return this.uxTecajValuteDataGridView.AllowUserToDeleteRows;}
			set {this.uxTecajValuteDataGridView.AllowUserToDeleteRows = value;}
		}
		
		/// <summary>
		/// Gets the <c cref="DataGridView"/> instance.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]
		public System.Windows.Forms.DataGridView DataGridView
		{
			get {return this.uxTecajValuteDataGridView;}
		}
		
		/// <summary>
		/// Gets a collection that contains all the columns in the control.
		/// </summary>
		[System.ComponentModel.Category(".netTiers")]		
		[System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Visible)]
		//[System.ComponentModel.EditorAttribute("System.Windows.Forms.Design.DataGridViewColumnCollectionEditor, System.Design", typeof(System.Drawing.Design.UITypeEditor))] 
		public System.Windows.Forms.DataGridViewColumnCollection Columns
		{
			get { return this.uxTecajValuteDataGridView.Columns; }
		}
		
		#endregion
		
		/// <summary> 
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.IContainer components = null;
	
		/// <summary> 
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && (components != null))
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}
	
		#region Constructor
	
		/// <summary>
		/// Initializes a new instance of the <see cref="TecajValuteDataGridViewBase"/> class.
		/// </summary>
		public TecajValuteDataGridViewBase()
		{			
			this.components = new System.ComponentModel.Container();			
			
			this.uxTecajValuteDataGridView = new System.Windows.Forms.DataGridView();
			this.uxTecajValuteBindingSource = new System.Windows.Forms.BindingSource(this.components);
			this.uxTecajValuteErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
			this.uxIDDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxIDValutaDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxSrednjiDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxKupovniDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxProdajniDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxDatumObjaveDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			this.uxIDBankaDataGridViewColumn = new System.Windows.Forms.DataGridViewComboBoxColumn();
			this.uxDatumPrimjeneDataGridViewColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
			//this.uxIDBankaBindingSource = new BankaBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDBankaBindingSource)).BeginInit();
			//this.uxIDValutaBindingSource = new ValutaBindingSource(this.components);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDValutaBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxTecajValuteDataGridView)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxTecajValuteBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxTecajValuteErrorProvider)).BeginInit();
			this.SuspendLayout();
						
			// 
			// uxTecajValuteErrorProvider
			// 
			this.uxTecajValuteErrorProvider.ContainerControl = this;
			this.uxTecajValuteErrorProvider.DataSource = this.uxTecajValuteBindingSource;						
			// 
			// uxTecajValuteDataGridView
			// 
			this.uxTecajValuteDataGridView.AutoGenerateColumns = false;
			this.uxTecajValuteDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
			this.uxTecajValuteDataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
		this.uxIDDataGridViewColumn,
		this.uxIDValutaDataGridViewColumn,
		this.uxSrednjiDataGridViewColumn,
		this.uxKupovniDataGridViewColumn,
		this.uxProdajniDataGridViewColumn,
		this.uxDatumObjaveDataGridViewColumn,
		this.uxIDBankaDataGridViewColumn,
		this.uxDatumPrimjeneDataGridViewColumn			});
			this.uxTecajValuteDataGridView.Dock = System.Windows.Forms.DockStyle.Fill;
			this.uxTecajValuteDataGridView.Location = new System.Drawing.Point(0, 0);
			this.uxTecajValuteDataGridView.Name = "uxTecajValuteDataGridView";
			this.uxTecajValuteDataGridView.Size = new System.Drawing.Size(470, 300);
			this.uxTecajValuteDataGridView.TabIndex = 0;	
			this.uxTecajValuteDataGridView.BackgroundColor = System.Drawing.Color.WhiteSmoke;
			this.uxTecajValuteDataGridView.EnableHeadersVisualStyles = false;
			this.uxTecajValuteDataGridView.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.OnTecajValuteDataGridViewDataError);
			this.uxTecajValuteDataGridView.CellValueNeeded += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnTecajValuteDataGridViewCellValueNeeded);
			this.uxTecajValuteDataGridView.CellValuePushed += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.OnTecajValuteDataGridViewCellValuePushed);
			
			//
			// uxIDDataGridViewColumn
			//
			this.uxIDDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDDataGridViewColumn.DataPropertyName = "ID";
			this.uxIDDataGridViewColumn.HeaderText = "ID";
			this.uxIDDataGridViewColumn.Name = "uxIDDataGridViewColumn";
			this.uxIDDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDDataGridViewColumn.ReadOnly = true;		
			//
			// uxIDValutaDataGridViewColumn
			//
			this.uxIDValutaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDValutaDataGridViewColumn.DataPropertyName = "IDValuta";
			this.uxIDValutaDataGridViewColumn.HeaderText = "IDValuta";
			this.uxIDValutaDataGridViewColumn.Name = "uxIDValutaDataGridViewColumn";
			this.uxIDValutaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDValutaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDValutaDataGridViewColumn.ReadOnly = false;		
			//
			// uxSrednjiDataGridViewColumn
			//
			this.uxSrednjiDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxSrednjiDataGridViewColumn.DataPropertyName = "Srednji";
			this.uxSrednjiDataGridViewColumn.HeaderText = "Srednji";
			this.uxSrednjiDataGridViewColumn.Name = "uxSrednjiDataGridViewColumn";
			this.uxSrednjiDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxSrednjiDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxSrednjiDataGridViewColumn.ReadOnly = false;		
			//
			// uxKupovniDataGridViewColumn
			//
			this.uxKupovniDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxKupovniDataGridViewColumn.DataPropertyName = "Kupovni";
			this.uxKupovniDataGridViewColumn.HeaderText = "Kupovni";
			this.uxKupovniDataGridViewColumn.Name = "uxKupovniDataGridViewColumn";
			this.uxKupovniDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxKupovniDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxKupovniDataGridViewColumn.ReadOnly = false;		
			//
			// uxProdajniDataGridViewColumn
			//
			this.uxProdajniDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxProdajniDataGridViewColumn.DataPropertyName = "Prodajni";
			this.uxProdajniDataGridViewColumn.HeaderText = "Prodajni";
			this.uxProdajniDataGridViewColumn.Name = "uxProdajniDataGridViewColumn";
			this.uxProdajniDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxProdajniDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxProdajniDataGridViewColumn.ReadOnly = false;		
			//
			// uxDatumObjaveDataGridViewColumn
			//
			this.uxDatumObjaveDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxDatumObjaveDataGridViewColumn.DataPropertyName = "DatumObjave";
			this.uxDatumObjaveDataGridViewColumn.HeaderText = "DatumObjave";
			this.uxDatumObjaveDataGridViewColumn.Name = "uxDatumObjaveDataGridViewColumn";
			this.uxDatumObjaveDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxDatumObjaveDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxDatumObjaveDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDBankaDataGridViewColumn
			//
			this.uxIDBankaDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxIDBankaDataGridViewColumn.DataPropertyName = "IDBanka";
			this.uxIDBankaDataGridViewColumn.HeaderText = "IDBanka";
			this.uxIDBankaDataGridViewColumn.Name = "uxIDBankaDataGridViewColumn";
			this.uxIDBankaDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxIDBankaDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxIDBankaDataGridViewColumn.ReadOnly = false;		
			//
			// uxDatumPrimjeneDataGridViewColumn
			//
			this.uxDatumPrimjeneDataGridViewColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCells;
			this.uxDatumPrimjeneDataGridViewColumn.DataPropertyName = "DatumPrimjene";
			this.uxDatumPrimjeneDataGridViewColumn.HeaderText = "DatumPrimjene";
			this.uxDatumPrimjeneDataGridViewColumn.Name = "uxDatumPrimjeneDataGridViewColumn";
			this.uxDatumPrimjeneDataGridViewColumn.Resizable = System.Windows.Forms.DataGridViewTriState.True;
			this.uxDatumPrimjeneDataGridViewColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
			this.uxDatumPrimjeneDataGridViewColumn.ReadOnly = false;		
			//
			// uxIDBankaDataGridViewColumn
			//				
			this.uxIDBankaDataGridViewColumn.DisplayMember = "Naziv";	
			this.uxIDBankaDataGridViewColumn.ValueMember = "ID";	
			this.uxIDBankaDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIDBankaDataGridViewColumn.DataSource = uxIDBankaBindingSource;				
				
			//
			// uxIDValutaDataGridViewColumn
			//				
			this.uxIDValutaDataGridViewColumn.DisplayMember = "Naziv";	
			this.uxIDValutaDataGridViewColumn.ValueMember = "ID";	
			this.uxIDValutaDataGridViewColumn.DisplayStyleForCurrentCellOnly = true;
			//uxIDValutaDataGridViewColumn.DataSource = uxIDValutaBindingSource;				
				
			
			// this
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.Controls.Add(this.uxTecajValuteDataGridView);
			this.Name = "TecajValuteDataGridView";
			this.Size = new System.Drawing.Size(470, 300);
			//((System.ComponentModel.ISupportInitialize)(this.uxIDBankaBindingSource)).EndInit();
			//((System.ComponentModel.ISupportInitialize)(this.uxIDValutaBindingSource)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxTecajValuteErrorProvider)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxTecajValuteDataGridView)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxTecajValuteBindingSource)).EndInit();
			this.ResumeLayout(false);
		}
		#endregion
				
		#region events
		
		/// <summary>
		/// Raised the CurrentEntityChanged event.
		/// </summary>
		protected void OnCurrentEntityChanged()
		{
			if (CurrentEntityChanged != null)
			{
				TecajValuteDataGridViewEventArgs args = new TecajValuteDataGridViewEventArgs();
				args.TecajValute = _currentTecajValute;
				CurrentEntityChanged(this, args); 
			}
		}
		
		#endregion
		
		/// <summary>
		/// Strongly typed event 
		/// </summary>
		public class TecajValuteDataGridViewEventArgs : System.EventArgs
		{
			private Entities.TecajValute	_TecajValute;
	
			/// <summary>
			/// the  Entities.TecajValute instance.
			/// </summary>
			public Entities.TecajValute TecajValute
			{
				get { return _TecajValute; }
				set { _TecajValute = value; }
			}	
		}
		
		/// <summary>
		/// Handles the DataError event of the uxTecajValuteDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewDataErrorEventArgs"/> instance containing the event data.</param>
		protected void OnTecajValuteDataGridViewDataError(object sender, System.Windows.Forms.DataGridViewDataErrorEventArgs e)
		{
			System.Diagnostics.Debug.WriteLine(string.Format( "{0}, {1}", e.ColumnIndex, e.RowIndex));
		}
		
		/// <summary>
		/// Handles the CellValueNeeded event of the uxTecajValuteDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnTecajValuteDataGridViewCellValueNeeded(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxTecajValuteDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIDDataGridViewColumn":
						e.Value = TecajValuteList[e.RowIndex].ID;
						break;
					case "uxIDValutaDataGridViewColumn":
						e.Value = TecajValuteList[e.RowIndex].IDValuta;
						break;
					case "uxSrednjiDataGridViewColumn":
						e.Value = TecajValuteList[e.RowIndex].Srednji;
						break;
					case "uxKupovniDataGridViewColumn":
						e.Value = TecajValuteList[e.RowIndex].Kupovni;
						break;
					case "uxProdajniDataGridViewColumn":
						e.Value = TecajValuteList[e.RowIndex].Prodajni;
						break;
					case "uxDatumObjaveDataGridViewColumn":
						e.Value = TecajValuteList[e.RowIndex].DatumObjave;
						break;
					case "uxIDBankaDataGridViewColumn":
						e.Value = TecajValuteList[e.RowIndex].IDBanka;
						break;
					case "uxDatumPrimjeneDataGridViewColumn":
						e.Value = TecajValuteList[e.RowIndex].DatumPrimjene;
						break;
				default:
				break;
			}
		}
		
		/// <summary>
		/// Handles the CellValuePushed event of the uxTecajValuteDataGridView control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.DataGridViewCellValueEventArgs"/> instance containing the event data.</param>
		protected void OnTecajValuteDataGridViewCellValuePushed(object sender, System.Windows.Forms.DataGridViewCellValueEventArgs e)
		{
			switch(uxTecajValuteDataGridView.Columns[e.ColumnIndex].Name)
			{
					case "uxIDDataGridViewColumn":
						TecajValuteList[e.RowIndex].ID = (System.Int32)e.Value;
						break;
					case "uxIDValutaDataGridViewColumn":
						TecajValuteList[e.RowIndex].IDValuta = (System.Int32)e.Value;
						break;
					case "uxSrednjiDataGridViewColumn":
						TecajValuteList[e.RowIndex].Srednji = (System.Single)e.Value;
						break;
					case "uxKupovniDataGridViewColumn":
						TecajValuteList[e.RowIndex].Kupovni = (System.Single)e.Value;
						break;
					case "uxProdajniDataGridViewColumn":
						TecajValuteList[e.RowIndex].Prodajni = (System.Single)e.Value;
						break;
					case "uxDatumObjaveDataGridViewColumn":
						TecajValuteList[e.RowIndex].DatumObjave = (System.DateTime)e.Value;
						break;
					case "uxIDBankaDataGridViewColumn":
						TecajValuteList[e.RowIndex].IDBanka = (System.Int32)e.Value;
						break;
					case "uxDatumPrimjeneDataGridViewColumn":
						TecajValuteList[e.RowIndex].DatumPrimjene = (System.DateTime)e.Value;
						break;
				default:
				break;
			}
		}
	}
}
